JavaScript

A5.ControlBarItem Button Object

Description

Definition of a button.

Properties

typestring

The type of item. For a button item the value must be "button".

sizestring

The size of the item.

autoHideDisclosurestring

Whether or not to hide the disclosure when the button is clicked. The default is "auto" which will close the disclosure if the A5.ControlBar.showDisclosure methods settings autoHide property is set to true, but leave it open if it is false. A value of "always" will always hide the disclosure. A value of "never" will never hide the disclosure.

actionsobject

Bindings of events to named actions. The property names are those of events that occur on the item. Values are "click", "down", "up", "downhold", "contextclick", "dblclick" and "swipe". The value of these properties is then name of the action to fire when the event occurs. If an action named "back" should fire then the user clicks the item, the JSON would be "{click: 'back'}".

settingsobject

The settings for the button.

themestring

The theme to use for the button.

layoutstring

The layout of the button. Values are "text", "icon", "text icon", "icon text", "text/icon", "icon/text", "text-icon" and "icon-text".

stylestring

The inline CSS to put on the button.

classNamestring

The class name to put on the button.

hoverClassNamestring

The class name to put on the button when the user hovers over it.

pressedClassNamestring

The class name to put on the button when the user presses it.

disabledClassNamestring

The class name to put on the button when it is disabled.

iconStylestring

The inline CSS to put on the icon in the button.

iconClassNamestring

The class name to put on the icon in the button.

htmlstring

The HTML to use in the button. Can contain template syntax that references control bar data. If there is a value in the data named "customer", it can be accessed by putting "{customer}" into the HTML.

iconstring

The icon to use in the button.

hoverIconstring

The icon to use in the button when the user hovers over it.

pressedIconstring

The icon to use in the button when the user presses it.

disabledIconstring

The icon to use in the button when it is disabled.

bindobject

Bindings for the item.

showstring

The show expression for the item.

disabledstring

The disabled expression for the item.